package com.tg.network.socket.http;

import com.tange.core.backend.service.api.CoreBackendService;
import com.tg.appcommon.android.TGLog;
import com.tange.core.backend.service.ep.EnvironmentProxy;


/**
 * 废弃：使用 Http 类，替代，参考 https://tange-ai.feishu.cn/docx/Gz0rdPHPVoKREqxOLKJc7ubznnc
 */
@java.lang.Deprecated
public class TGHttp {

    private static final String TAG = "TGHttp#Biz";

    private static TanGeServiceApi api;

    @java.lang.Deprecated
    public static TanGeServiceApi getInstance() {
        if (api == null) {
            synchronized (TGHttp.class) {
                if (api == null) {
                    TGLog.i(TAG, "init biz api");
                    api = CoreBackendService.retrofit().create(TanGeServiceApi.class);
                }
            }
        }
        return api;
    }

    public static void reset(){
        TGLog.i(TAG, "[reset] ");
        api = null;
    }
}
